<%@ page language="java" pageEncoding="UTF-8" 
%><%@page import="kr.co.sdworld.api.apns.model.ApnsLogin"%><%
	ApnsLogin login = (ApnsLogin)session.getAttribute("login");
	String viewName = request.getParameter("viewName");
%>
<script type="text/javascript">
	function logout() 
	{
		if(confirm("로그아웃하시겠습니까?")) {
			APNS.util.doAjax({
				url: APNS.context.getContextPath() + "/logout.sd",
				complete: function( req, status) {
					if(status == "success")
					{
						var response = eval("(" + req.responseText + ")");
						if( response.result == "success") {
							alert( "로그아웃 되었습니다.");
						}
					}
				}
			});
		}
	}
</script>
<h1><%= viewName %></h1>
<div id="header">
	<h1>[헤더]</h1>
	<ul id="user-info"><%
		if(login != null) {%>
			<li>id : <%=login.getUserId() %></li>
			<li>pw : <%=login.getUserPw() %></li>
			<li><a href="javascript:logout()">로그아웃</a></li><%
		}
		else 
		{%>
			<li><a href="<%=request.getContextPath()%>/page.sd?viewName=ApnsMemberJoin">회원가입하기</a></li>
			<li><a href="<%=request.getContextPath()%>">로그인하기</a></li><%
		}%>
	</ul>
</div>
<div id="menu">
	<h1>[메뉴]</h1>
	<ul>
		<li><a href="<%=request.getContextPath()%>/page.sd?viewName=ApnsMain">Main</a></li>
		<li><a href="<%=request.getContextPath()%>/page.sd?viewName=ApnsApplication">Application</a></li>
		<li>Message</li>
		<li>Device</li>
	</ul>
</div>